// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.*;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.text.SimpleDateFormat;
// import java.util.Collections;
// import java.util.Date;
// import java.util.List;
// import java.util.TimeZone;
#pragma once
#include <string>
#include <list>
#include <sys/time.h>
#include "../SQLExprImpl.h"
#include "../SQLReplaceable.h"
#include "SQLLiteralExpr.h"
#include "SQLValuableExpr.h"
#include "../../../utils/common_ptr.h"

class SQLDataType;
class SQLExpr;
class DbType;
class SQLASTVisitor;
class SQLDateTimeExpr;

class SQLDateTimeExpr : public SQLExprImpl, virtual public SQLLiteralExpr, virtual public SQLValuableExpr, virtual public SQLReplaceable
{
public:
  static SQLDataType_ptr DATA_TYPE;
  static long supportDbTypes;

  SQLExpr_ptr literal;

  SQLDateTimeExpr();

  SQLDateTimeExpr(long now, struct timezone *timeZone);
  SHAREDOBJECT(SQLDateTimeExpr);

  void setLiteral(long x, struct timezone *timeZone);

  SQLDateTimeExpr(string_ptr  literal);

  SQLExpr_ptr getLiteral();

  void setLiteral(string_ptr  literal);

  void setLiteral(SQLExpr_ptr x);

  //@Override
  SQLDataType_ptr computeDataType();

  string_ptr  getValue();

  //@Override
  BOOL_ptr replace(SQLExpr_ptr expr, SQLExpr_ptr target);

  //@Override
  void accept0(SQLASTVisitor_ptr visitor);

  //@Override
  int hashCode();

  //@Override
  bool equals(Object_ptr obj);

  // SQLDateTimeExpr clone() ;
  virtual SQLObject_ptr clone();

  //@Override
  SQLObject_list_ptr getChildren();

  static BOOL_ptr isSupport(DbType dbType);

  static BOOL_ptr check(string_ptr  str);
};
